package edu.sctu.liangyuxiang.day20150512.text1;

/**
 * Created by user06 on 2015/5/12.
 */
public class TextThree extends TextOne {
    private int number;
    private String action;
    private String color;

    public TextThree(int number, String action, String color) {
        this.number = number;
        this.action = action;
        this.color = color;
    }
    @Override
    public void getnumber() {
        if(number==140610) {
            System.out.println(number);
        }else{
            System.out.println("其他学号："+number);
        }
    }

    @Override
    public void getcolor() {
        if(color.equals("红色")){
        System.out.println(color);
        }else{
            System.out.println("其他颜色："+color);
        }
    }

    @Override
    public void getaction() {
        if(action.equals("吃饭")){
            System.out.println(action);
        }else{
            System.out.println("其他动作:"+action);
        }

    }
}
